import CheckBox from './types/checkBox';
import Date from './types/date';
import DateTime from './types/dateTime';
import Email from './types/email';
import File from './types/file';
import Image from './types/image';
import Number from './types/number';
import Radio from './types/radio';
import Tel from './types/tel';
import Text from './types/text';
import Textarea from './types/textarea';
import Time from './types/time';
import Url from './types/url';

/**
 * 动态表单元素类型表
 */
export const DynamicFormElementTypeMap: { [key in string]: IDynamicFormElementType } = {
    Text,
    Textarea,
    Number,
    Radio,
    CheckBox,
    Date,
    Time,
    DateTime,
    Email,
    Tel,
    Url,
    File,
    Image
};

/**
 * 动态表单元素类型定义
 */
export interface IDynamicFormElementType {
    type: string;
    name: string;
    defaultTooltips: string;
    icon: string;
    multipleChoicesValues: string[];
    draging: boolean;
    enableTooltips: boolean;
    enableUnit: boolean;
    enableMaxLength: boolean;
    componentIcon: string | null;
    selectComponent: boolean;
    valueType: string;
    requiredErrorPrefix: string;
}
